﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace Bug_Speed
{
    public partial class ProcessBar : Form
    {
        public ProcessBar(ProcessEventSource pe)
        {
            InitializeComponent();
            pe.EventProcessSteps += new ProcessEventSource.ProcessEventHandler(this.setCurrent);
        }

        private void setCurrent(EventProcessArg e)
        {
            progressBar1.Maximum = e.Maximum;
            progressBar1.Minimum = e.Minimum;
            progressBar1.Value = e.CurrentProcessStepsNumber ;
            label1.Text = e.CurrentProcessStepsNumber.ToString();
            Application.DoEvents();
        }

    }
}
